GUI Help > Other > mousePosY

mousePosY
int y=mousePosY([handle gadget])

Description:
Retrieves the Y-coordinate of the mouse, either relative to the main window, or relative to the specified gadget.

This command is more accurate than MouseY. MouseY uses the DirectX screen height, which is not always the same as the true height. For example if your desktop is 1024x768 pixels but the DBPro resolution is set to 640x480 stretched to fit, MouseY will report 480 when the mouse is at the bottom edge of the screen, mousePosY will return 768.

Return Value:
Y position of mouse.

Parameters:
[gadget] Optional. If specified the returned Y co-ordinate will be relative to the top-left of the gadget's client area.
Remarks:


See Also:


Example:
(Note: You will need to include the GUI constants file for this example to work)